package chant.util;

import chant.model.Book;
import org.apache.log4j.Logger;

import java.util.ArrayList;
import java.util.List;

/**
 * Create-Date: 2016/6/16
 * Description:
 */
public class BookUtil {
    static final Logger logger = Logger.getLogger(BookUtil.class);
    private static List<Book> bookList = new ArrayList<Book>();

    public static void loadData() {
        bookList = Book.me.find("select * from book order by sort");
        logger.info("load book: " + bookList.size());
    }

    public static List<Book> getBookList() {
        return bookList;
    }
}
